p1 <- pokemon %>% mutate(`Type 1` = reorder(`Type 1`, Total, FUN = median)) %>% ggplot(aes(x = `Type 1`, y = Total, fill = `Type 1`)) + geom_boxplot() + labs(x = "Pokemon Type") ggplotly(p1)
p <- ggplot(pokemon, aes(x = Defense, y = Attack, color = `Type 1`)) + geom_point() ggplotly(p)
library(tidyverse) library(plotly) library(crosstalk) pokemon <- read_csv("pokemon.csv")